package cn.sdormitory.smartdor.entity;

import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @创建人：zhouyang
 * @创建时间：2021/10/13 11:40
 * @version：V1.0
 */
@Data
@TableName("sd_repair")
public class SdRepair implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Long id;

    /**
     * 宿舍设备值
     */
    @ApiModelProperty(value = "宿舍设备值")
    private String devicesValue;

    /**
     * 宿舍表ID
     */
    @ApiModelProperty(value = "宿舍表ID")
    private Long bdormitoryId;

    /**
     * 宿舍栋号
     */
    @ApiModelProperty(value = "宿舍栋号")
    private String buildingNo;

    /**
     * 楼层
     */
    @ApiModelProperty(value = "楼层")
    private String storey;

    /**
     * 宿舍号
     */
    @ApiModelProperty(value = "宿舍号")
    private String dormitoryNo;

    /**
     * 报修说明
     */
    @ApiModelProperty(value = "报修说明")
    private String repairDesc;

    /**
     * 照片
     */
    @ApiModelProperty(value = "照片")
    private byte[] photo;

    /**
     * 报修状态：0->报修中；1->已处理
     */
    @ApiModelProperty(value = "报修状态：0->报修中；1->已处理")
    private String status;

    /**
     * 报修时间
     */
    @ApiModelProperty(value = "报修时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date modifyTime;

    /**
     * 报修人
     */
    @ApiModelProperty(value = "报修人")
    private String repairBy;

    private Long repairUserId;

    @TableField(exist = false)
    private List<Long> deviceIds;

    @TableField(exist = false)
    private String deviceName;

    @TableField(exist = false)
    private String devicesId;

    @ApiModelProperty(value = "是否值班提交")
    private String isDuty;
    
    @TableField(exist = false)
    private String deviceStr;
}
